﻿namespace Shared.Http.UserAgentParser
{

    /// <summary>
    /// 用户设备信息
    /// </summary>
    public class UserAgentInfo
    {
        public UserAgentInfo(string deviceType, string operatingSystem, string browser, string rawUserAgent, bool isBot)
        {
            DeviceType = deviceType;
            OperatingSystem = operatingSystem;
            Browser = browser;
            RawUserAgent = rawUserAgent;
            IsBot = isBot;
        }

        /// <summary>
        /// 设备类型
        /// </summary>
        public string DeviceType { get; set; }

        /// <summary>
        /// 操作系统
        /// </summary>
        public string OperatingSystem { get; set; }

        /// <summary>
        /// 操作系统版本号
        /// </summary>
        public string OsVersion { get; set; } = "UNKNOWN";

        /// <summary>
        /// 浏览器名
        /// </summary>
        public string Browser { get; set; }

        /// <summary>
        /// 浏览器版本
        /// </summary>
        public string BrowserVersion { get; set; } = "UNKNOWN";

        /// <summary>
        /// 原始字符串
        /// </summary>
        public string RawUserAgent { get; set; }

        /// <summary>
        /// 是否为爬虫机器人
        /// </summary>
        public bool IsBot { get; set; }    
        
        /// <summary>
        /// 品牌（三星、HUAWEI、XIAOMI）
        /// </summary>
        public string DeviceBrand { get; set; } = "UNKNOWN";

        /// <summary>
        /// 设备模型
        /// </summary>
        public string DeviceModel { get; set; } = "UNKNOWN";
    }
}
